import java.util.Scanner;
public class exercise1 {
    public static void main(String[] args) {
        int n;
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个正整数n:");
        n = sc.nextInt();
        System.out.println("计算结果为:");
        double sum = 0;
        for (int i = 1; i <= n; i++){
            sum += 1.0 / (1 + i*i);
        }
        System.out.print(sum);
    }
}
